const mongoose = require('mongoose')

const Schema = mongoose.Schema

const ProfilesSchema = new Schema({
  type: {
    type: String
  },
  describe: { // 描述
    type: String
  },
  income: { // 收入
    type: Number,
    required: true
  },
  expend: { // 支出
    type: Number,
    required: true
  },
  cash: { // 现金
    type: Number,
    required: true
  },
  remark: { // 备注
    type: String
  },
  date: {
    type: Date,
    default: Date.now
  }
})

const Profile = mongoose.model('profiles', ProfilesSchema)

module.exports = Profile